package com.typingtutor.util;

import java.util.HashMap;
import java.util.Map;

// 定义一个英文和中文映射的类
public class MappingDatabaseTableUtils {
    private final static Map<String, String> mapping = new HashMap<>();
    static {
        mapping.put("随机范围", "random_range");
        mapping.put("操作符", "operator_str");
        mapping.put("匹配字段", "math_field");
    }
    // 根据英文获取对应的中文
    public static String getTableField(String mappingName) {
        return mapping.get(mappingName);
    }

    // 添加新的映射关系
    public static void addMapping(String mappingName, String tableField) {
        mapping.put(mappingName, tableField);
    }
}